def find(scores):
    name = input('请输入姓名')
    print('分数为', scores[name])

student_scores = {'Alice': 90, 'Bob': 85, 'Charlie': 92, 'David': 78, 'Eva': 88}

student_scores['Frank'] = 95
student_scores['Bob'] = 80
student_scores.pop('David')
# find(student_scores)
# print(student_scores)
for key, value in student_scores.items():
    print(key + ' ' + str(value))
list = [(key, value) for key, value in student_scores.items()]
print(list)
print(max(student_scores, key = student_scores.get))
# from random import sample
#
# dict = 'abcdefghijklmnopqrstuvwxyz'
# print(sample(dict, 2))
# lt = [''.join(sample(dict, 2)) for i in range(10)]
#
# print(lt)